package com.lxm.service;

import com.lxm.dto.BlogDTO;
import com.lxm.dto.Result;
import com.lxm.entity.Blog;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 发布表 服务类
 * </p>
 *
 * @author ${author}
 * @since 2024-10-02
 */
public interface BlogService extends IService<Blog> {

    Result add(BlogDTO blogDTO);

    @Transactional
    Result batchDelete(List<Long> ids);
    Result listByUserId(Long userId,Integer current);
    @Transactional
    Result updateBlog(BlogDTO blogDTO,Long userId);
    Result listByTime(Long current);
    Result getDetailBlogRelease(Long blogId);

    Result getDetailBlogDraftByME();

    Result getBlogTypeList();

    Result listByType(Integer type, Long current);
}
